package com.kly.user.db.dao.impl;

import com.fqgj.common.base.AbstractBaseMapper;
import com.google.common.collect.Maps;
import com.kly.user.db.dao.IssueSupplyRecordDao;
import com.kly.user.db.entity.IssueSupplyRecordEntity;
import com.kly.user.enums.GenderEnum;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.Map;

/**
 * User: user
 * Date: 2023-11-15
 * Time: 15:40:09.269
 */

@Repository
public class IssueSupplyRecordDaoImpl extends AbstractBaseMapper<IssueSupplyRecordEntity> implements IssueSupplyRecordDao {


    @Override
    public int issueCountHour(String chatterCode, LocalDateTime currentHourTime) {
        Map<String, Object> params = Maps.newHashMap();
        params.put("chatterCode", chatterCode);
        params.put("gmtCreate", currentHourTime);
        return (Integer) this.getSqlSession().selectOne(this.getStatement("issueCountHour"), params);
    }
}